﻿@model IEnumerable<ReceivedTextMessage>

@{
	ViewData["Title"] = "Received Text";
}

<h2>@ViewData["Title"] (@Model.Count())</h2>


@foreach (var item in Model)
{
	<div class="media">
		@*<img class="mr-3" src="@item.headimgurl" style="width:64px;" />*@
		<div class="media-body">
			@*<h5 class="mt-0">
				<span>@item.From</span>
				@{
					switch (item.sex)
					{
						case 1:
							<i class="fas fa-mars text-primary"></i>
							break;
						case 2:
							<i class="fas fa-venus text-danger"></i>
							break;
						default:
							break;
					}
				}
			</h5>*@
			<dl class="dl-horizontal">
				<dt>OpenId</dt>
				<dd>
					<div class="text-truncate" style="width:150px;" data-container="body" data-toggle="popover" data-placement="bottom" data-content="@item.From">@item.From</div>
				</dd>
				<dt>Content</dt>
				<dd>@item.Content</dd>
				<dt>Received Time</dt>
				<dd>@item.ReceivedTime.ToLocalTime().ToString("yyyy-MM-dd hh:mm:ss")</dd>
			</dl>
			<a asp-action="SendWeixin" asp-route-openid="@item.From">发送微信消息</a>
		</div>
	</div>
	<hr />
}